package com.xzq.erp.domain.query;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xzq.erp.enums.OrderStatus;
import com.xzq.erp.enums.PaymentMethod;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@EqualsAndHashCode(callSuper = true)
@Data
@Schema(description = "订单分页请求参数")
@Accessors(chain = true)
public class OrderPageQuery extends BasePageQuery {

    /**
     * 客户名称
     */
    @Schema(description = "客户名称", example = "张三")
    @ToolParam(required = false, description = "客户名称")
    private String customerName;

    /**
     * 商品名称
     */
    @Schema(description = "商品名称", example = "iphone")
    @ToolParam(required = false, description = "商品名称")
    private String productName;

    /**
     * 开始时间
     */
    @Schema(description = "开始时间", example = "2022-01-01 00:00:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ToolParam(required = false, description = "开始时间 格式为yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    @Schema(description = "结束时间", example = "2022-01-03 00:00:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ToolParam(required = false, description = "结束时间 格式为yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    /**
     * 订单状态:0-待付款,1-已付款,2-已发货,3-已完成,4-已取消
     */
    @Schema(description = "订单状态:0-待付款,1-已付款,2-已发货,3-已完成,4-已取消", example = "0")
    @ToolParam(required = false, description = "订单状态:0-待付款,1-已付款,2-已发货,3-已完成,4-已取消")
    private Integer status;

}


